<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>  

<script type="text/javascript"
	src='<c:url value="/resources/js/jquery-ui-1.8.16.custom.min.js"/>'></script>
<link rel="stylesheet"
	href='<c:url value="/resources/css/redmond/jquery-ui-1.8.16.custom.css"/>' />
<script type="text/javascript"
	src='<c:url value="/resources/js/jquery.ui.datepicker-zh-CN.js"/>'></script>
<script type="text/javascript"
	src='<c:url value="/resources/js/profit/addProfitPage.js"/>'></script>


<form action="" id="profitForm">
<input type="hidden" name="pageIndex" value="1"/>
	<fieldset>
	<legend>返利录入</legend>
		<table class="nostyle">
			<tbody>
				<tr>
					<td><label>统计日期:</label></td>
					<td>
						<input type="text" id="countDate" name="countDate" readonly="readonly" />
					</td>
					<td><label>销售额:</label></td>
					<td>
						<input type="text" id="yesterSelledAmount" name="yesterSelledAmount"/>
					</td>
					<td><label>接受返利会员数(人):</label></td><td><input type="text" id="shouldReturnProfitMemberCount" readonly="readonly"/></td>
				</tr>
				<tr>
					<td><label>返利比例(%):</label></td><td><input type="text" id="profitReturnPercent" name="profitReturnPercent" value="5"><input type="button" id="calcBtn" value="计算"></td>
					<td><label>返利总额:</label></td><td><input type="text" id="totalProfitAmount" readonly="readonly"/></td>
					<td><label>平均返利额:</label></td><td><input type="text" id="avgReturnProfitAmount"  readonly="readonly"/></td>
				</tr>
				<tr>
					<th colspan="4"><input id="generateBtn" type="button" value="生成返利表" /></th>
				</tr>
			</tbody>
		</table>	
	</fieldset>
</form>
<div id="profitTable" title="返利表">
</div>
<div id="returnHistoryDiv" title="返利记录">
</div>

<div id="editAmountDialog" title="请输入新的返还金额">
	<form id="editNewAmountForm">
		<input type="hidden" id="memberIds" name="memberIDs" value="" />
	金额：<input type="text" name="newAmount" id="newAmount"/>
	<input type="button" value="提交" id="submitNewAmountBtn" onclick="editNewAmount()" />
	</form>
</div>